#include <iostream>
#include <conio.h>
#include <math.h>

using namespace std;

class Diem{
	private:
		int x;
		int y;
	public:
		Diem(int h=0,int y=0);
		void nhap();
		void in();
		int LayGTx();
		int LayGTy();
		float KhoangCach(Diem);
		Diem DoiXung();
};

Diem::Diem(int h,int t){
	x =h;
	y =t;
}

void Diem::nhap(){
	cout <<"nhap vao hoanh do: "; cin >>x;
	cout <<"nhap vao tung do: "; cin >>y;
}

void Diem::in(){
	cout <<"("<<x<<","<<y<<")";
}

int Diem::LayGTx(){
	return x;
}

int Diem::LayGTy(){
	return y;
}


float Diem::KhoangCach(Diem m){
	float kq;
	kq =sqrt(pow(x - m.x,2) + pow(y - m.y,2)) ;
	return kq;
}

Diem Diem::DoiXung(){
	Diem kq;
	kq.x = -x;
	kq.y = -y;
	return kq;
}


